<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/wmsproject/warehouse/Wms_Rack.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/wmsproject/warehouse/Wms_Rack.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Wms_Rack",
        setup() {
            const table = ref({
                key: "RackId",
                footer: "Foots",
                cnName: "货架管理",
                name: "warehouse/Wms_Rack",
                newTabEdit: false,
                url: "/Wms_Rack/",
                sortName: "RackId"
            });
            const editFormFields = ref({"WarehouseId":"","ZoneId":"","RackCode":"","RackName":"","IsAutomatic":"","Tunnel":"","Enabled":"","Remarks":""});
            const editFormOptions = ref([[{"dataKey":"WMS_Warehouse","data":[],"title":"仓库","required":true,"field":"WarehouseId","type":"select"},
                               {"dataKey":"WMS_Zone","data":[],"title":"货区","required":true,"field":"ZoneId","type":"select"}],
                              [{"title":"货架编码","required":true,"field":"RackCode"},
                               {"title":"货架名称","field":"RackName"}],
                              [{"dataKey":"enabled","data":[],"title":"是否自动化货架","field":"IsAutomatic","type":"switch"},
                               {"title":"巷道","field":"Tunnel"}],
                              [{"dataKey":"enabled","data":[],"title":"是否启用","field":"Enabled","type":"switch"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"WarehouseId":"","ZoneId":"","RackCode":""});
            const searchFormOptions = ref([[{"dataKey":"WMS_Warehouse","data":[],"title":"仓库","field":"WarehouseId","type":"select"},{"title":"货架编码","field":"RackCode","type":"like"},{"dataKey":"WMS_Zone","data":[],"title":"货区","field":"ZoneId","type":"select"}]]);
            const columns = ref([{field:"WarehouseId",title:"仓库",type:"bigint",bind:{ key:"WMS_Warehouse",data:[]},width:110,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Warehouse.WarehouseCode",title:"仓库代码",type:"string",width:90,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Warehouse.WarehouseName",title:"仓库名称",type:"string",width:90,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Zone.ZoneCode",title:"库区代码",type:"string",width:90,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Zone.ZoneName",title:"库区名称",type:"string",width:90,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"ZoneId",title:"货区",type:"bigint",bind:{ key:"WMS_Zone",data:[]},width:110,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"RackCode",title:"货架编码",type:"string",link:true,width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"RackName",title:"货架名称",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"IsAutomatic",title:"是否自动化货架",type:"int",bind:{ key:"enabled",data:[]},width:120,showOverflowTooltip:true,align:"left"},
                       {field:"Tunnel",title:"巷道",type:"string",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Enabled",title:"是否启用",type:"int",bind:{ key:"enabled",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"RackId",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
